<div class="framework-sidebar hide">
    <div class="sidebar-content">
        <div class="sidebar-inner">
            <div class="sidebar-fold">
                <span class="glyphicon glyphicon-option-vertical transition"></span>
            </div>
            {% for pmenu in menus %}
                {% if pmenu.children %}
                <div data-menu-box="m-{{pmenu.id}}">
                    {% for menu in pmenu.children %}
                    <div class="sidebar-nav main-nav">
                        {% if menu.children %}
                        <div class="sidebar-title">
                            <div class="sidebar-title-inner">
                                <span class="sidebar-title-icon fa fa-caret-right transition"></span>
                                <span class="sidebar-title-text">{{ menu.title }}</span>
                            </div>
                        </div>
                        <ul class="sidebar-trans" style="display:none" data-menu-node='m-{{pmenu.id}}-{{menu.id}}'>
                            {% for submenu in menu.children %}
                            <li class="nav-item">
                                <a data-menu-node='m-{{pmenu.id}}-{{submenu.id}}' data-open="{{submenu.url}}"
                                class="sidebar-trans">
                                    <div class="nav-icon sidebar-trans">
                                        <span class="{{ submenu.icon if submenu.icon else 'fa fa-link' }} transition"></span>
                                    </div>
                                    <span class="nav-title">{{submenu.title}}</span>
                                </a>
                            </li>
                            {% endfor %}
                        </ul>
                        {% else %}
                        <ul class="sidebar-trans">
                            <li class="nav-item">
                                <a data-menu-node='m-{{ pmenu.id }}-{{ menu.id }}' data-open="{{ menu.url }}"
                                class="sidebar-trans">
                                    <div class="nav-icon sidebar-trans">
                                        <span class="{{ menu.icon if menu.icon else 'fa fa-link' }} transition"></span>
                                    </div>
                                    <span class="nav-title">{{ menu.title }}</span>
                                </a>
                            </li>
                        </ul>
                        {% endif %}
                    </div>
                    {% endfor %}
                </div>
                {% endif %}
            {% endfor %}
        </div>
    </div>
</div>